cc = sw5cc.old -host -O3 
cc_slave = sw5cc.old -O3 

FLAGS_S= -DSIZEX=3602 -DSIZEY=3602 -DBLKX=60 -DBLKY=60 -DCHECK -DPROFILING
FLAGS_D= -DSIZEX=3602 -DSIZEY=3602 -DBLKX=40 -DBLKY=40 -DCHECK -DPROFILING

LIBFLAGS =  -I/usr/sz/swcc/sw3gcc-binary/include

OBJECT_S = master_s.o slave_s.o
OBJECT_D = master_db.o slave_db.o

all: single double

single: master_s.o slave_s.o 2d5p_s 
double: master_db.o slave_db.o 2d5p_d

master_s.o: master_s.c
	$(cc) $(FLAGS_S)  -c  master_s.c  $(LIBFLAGS)
master_db.o: master_db.c
	$(cc) $(FLAGS_D)  -c  master_db.c  $(LIBFLAGS)
slave_s.o: slave_s.c
	$(cc_slave) $(FLAGS_S)  -c slave_s.c
slave_db.o: slave_db.c
	$(cc_slave) $(FLAGS_D)  -c slave_db.c
2d5p_s:  $(OBJECT_S) 
	$(cc_slave) -hybrid  -o 2d5p_single $(OBJECT_S)
2d5p_d:  $(OBJECT_D) 
	$(cc_slave) -hybrid  -o 2d5p_double $(OBJECT_D)
clean:
	@-rm -f *.o 2d5p_single 2d5p_double

